
section .text

extern k_printc

	global __mov_cursor
__mov_cursor:	
	push	ebp
	mov	ebp,	esp
	push	eax
	push	edx

	;; Set the MSB of the index
	mov	al,	14
	mov	dx,	0x3d4
	
	out	dx,	al
	inc	dx
	
	mov	al,	[ebp + 8]
	out	dx,	al

	;; Set the LSB
	mov	al,	15
	mov	dx,	0x3d4
	
	out	dx,	al
	inc	dx
	
	mov	al,	[ebp + 12]
	out	dx,	al

	;; Restor the stack
	pop	edx
	pop	eax
	pop	ebp
	ret

